<template>
    <div id="app">
        <MusicItem :item="item"
    v-for="item of music" :key="item.name"></MusicItem>
    </div>
</template>

<script>
import axios from 'axios';
import MusicItem from '../components/Music'
    export default {
        name: 'App',
        components:{
            MusicItem
        },
        data(){
            return {
                music:[]
            }
        },
        mounted(){
            axios.get("http://120.25.251.98:4000/top/playlist?cat=华语").then(res=>{
            this.music = res.data.playlists;
            })
        }
    }
</script>

<style  scoped>
.img{
    width: 100px;
    height: 100px;
}
</style>